feat: add round domain separator to adata#8557
Open
zhongxishen wants to merge 1 commit intomasterfrom
Open
Conversation
cbc052c to
f61af36
Compare
Contributor
zahin-mohammad
left a comment
There was a problem hiding this comment.
can you add some context for this PR (what the problem is and how this fixes that) 🙏🏾
Contributor
Author
Added to the description of the PR. |
zahin-mohammad
previously approved these changes
Apr 20, 2026
Contributor
zahin-mohammad
left a comment
There was a problem hiding this comment.
sorry, missing one piece, can we add a test for this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TICKET: HSM-1513
This is what was left to be done from https://linear.app/bitgo/issue/HSM-36/unauthenticated-dsg-session-restore-in-dsgsetsession-enables-session#comment-fd042a25.
Specifically:
"What remains valid
The absence of a round number in adata is a legitimate, though low-priority, gap. At the validateAdata() level, a Round 1 ciphertext is indistinguishable from a Round 2 ciphertext for the same transaction. We recommend addressing this as a hardening improvement, consistent with the approach taken in the HSM."
The approach is similar to what's done in hsm-firmware https://github.com/BitGo/hsm-firmware/blob/develop/src/bg/dkls23.c#L40-L41.